var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
  // If the importer is in node compatibility mode or this is not an ESM
  // file that has been converted to a CommonJS file using a Babel-
  // compatible transform (i.e. "__esModule" has not been set), then set
  // "default" to the CommonJS "module.exports" for node compatibility.
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
  mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var stdin_exports = {};
__export(stdin_exports, {
  default: () => stdin_default
});
module.exports = __toCommonJS(stdin_exports);
var import_rich_text_uniapp_sfc = require("./rich-text.uniapp-sfc.css");
var import_vue = require("vue");
var import_mp_html = __toESM(require("./mp-html/mp-html.js"));
var import_utils = require("../utils");
var import_vue2 = require("vue");
const __vue_sfc__ = (0, import_vue.defineComponent)({
  name: (0, import_utils.createNamespace)("RichText")[0],
  options: {
    // https://uniapp.dcloud.io/matter.html#mp
    virtualHost: true
  },
  components: { MpHtml: import_mp_html.default },
  props: {
    // html 字符串
    content: String
  },
  setup(props) {
    const isHtml = (0, import_vue.computed)(() => {
      const reg = /<[^>]+>/g;
      return reg.test(props.content || "");
    });
    return { isHtml };
  }
});
function __vue_render__(_ctx, _cache) {
  const _component_MpHtml = (0, import_vue2.resolveComponent)("MpHtml");
  return (0, import_vue2.openBlock)(), (0, import_vue2.createElementBlock)(
    "view",
    {
      class: (0, import_vue2.normalizeClass)(["fan-rich-text", { pre: !_ctx.isHtml }])
    },
    [
      (0, import_vue2.createVNode)(_component_MpHtml, {
        content: _ctx.content,
        "lazy-load": "",
        selectable: "",
        "show-img-menu": ""
      }, null, 8, ["content"])
    ],
    2
    /* CLASS */
  );
}
__vue_sfc__.render = __vue_render__;
var stdin_default = __vue_sfc__;
